home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / asmutil / 80x0393.zip / CTRLC.DOC < prev    next >
Text File  |  1992-09-30  |  1KB  |  31 lines

  1. By: Matthew Hildebrand
  2. Re: Ctrl-C & Ctrl-Break trap
  3. ----------------------------------------------------------------------
  4.  
  5. I've been noticing a lot of discussion regarding Ctrl-C and Ctrl-Break
  6. trapping, and the difficulties associated with it.  Here's some code I
  7. wrote to do this; it works quite well. TASM syntax, of course:
  8.  
  9. Notes:
  10. 1. To  trap  other keys,  add the  trapping  logic  between  @@L2  and 
  11.    @@oldHandler.
  12. 2. This code uses int 16h, function 12h (Get enhanced keyboard flags). 
  13.    If you  don't have an  enhanced keyboard,  I  don't know what  will
  14.    happen. I guess int 16h, function 02h would be in order. Of course,
  15.    you could just take a peek at 40:17,  but I've let the BIOS do  the 
  16.    job for compatability.
  17. 3. I've got a P386 at the top. There aren't any 386+ instructions, but
  18.    I threw it in for alignment.  In fact, I don't think there's even a
  19.    286 instruction  in  there.  Who knows?  If there is,  it's nothing 
  20.    that's hard to change.
  21. 4. I've  tried all sorts of  ways to confuse this  code, but  it  kept  
  22.    working.  If anyone finds  something  wrong with it,  please let me 
  23.    know.
  24.  
  25. Please direct any questions or comments to either 80XXX or 1:247/128.2
  26. whichever is appropriate.
  27.  
  28. Hope it helps,
  29.  
  30.         Matt
  31.